/*
 * based off of https://github.com/gitterHQ/sidecar
 * license: MIT
 */
.map-buttons {
  margin-top: -10px;
  & button,
  & .input-group{
    width:300px;
  }
  .input-group{
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
  }
}

.map-filter {
    background:#fff;
    border-color: darkgreen;
}

.map-filter + .input-group-addon {
  width: 40px;
  color: darkgreen;
  background-color: #fff;
  border-color: darkgreen;
  .fa {
    position:absolute;
    top:50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    right:10px;
  }
}

.map-filter.filled + span.input-group-addon {
  background: darkgreen;
  border-color: #000d00;
  color: #fff;
  cursor: pointer;
  padding: 0;
  span {
    display: inline-block;
    min-height: 30px;
    width: 100%;
  }
}

.map-wrapper {
  display: block;
  height: 100%;
  width: 100%;
}


.drawer .map-fixed-header {
  padding-top: 30px;
}

.map-accordion {
  width: 100%;
  max-width: 700px;
  overflow-y: auto;

  .map-accordion-panel-title {
    padding-bottom: 0px;
  }

  .map-accordion-panel-collapse {
    transition: height 0.001s;
  }

  .map-accordion-panel-nested-collapse {
    transition: height 0.001s;
  }

  .map-accordion-panel-nested {
    margin: 0 20px;
  }

  .map-accordion-panel-nested-body {
    padding-left: 36px;
  }

  .map-accordion-panel-nested-title > a {
    cursor: pointer;
  }

  @media (max-width: 400px) {
    .map-accordion-panel-nested {
      margin: 0;
    }
    .map-accordion-panel-nested-title {
      padding-left: 9px;
    }
    .map-accordion-panel-nested-body {
      padding-left: 18px;
    }
  }

  a:focus {
    text-decoration: none;
    color:darkgreen;
  }
  a:focus:hover {
    text-decoration: underline;
    color:#001800;
  }

  h2 > a {
    width:100%;
    display:block;
    background:#efefef;
    padding:10px 0;
    padding-left:50px;
    padding-right:20px;
    cursor: pointer;
  }

  a > h3 {
    padding-left: 40px;
    padding-bottom: 10px;
    display: block;
  }

  .map-accordion-block {
    :before {
      margin-right: 15px;
    }

    p {
      text-indent: -15px;
      margin-left: 60px;
      padding-right: 20px;
      @media (max-width: 400px) {
          margin-left:30px;
      }
    }
  }

  @media (max-width: 720px) {
    left: 0;
    right: 0;
    width: 100%;
    top: 195px;
    bottom: 0;
    margin: 0;
    // position:absolute;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    h2 {
      margin:15px 0;
      padding:0;
      &:first-of-type {
        margin-top:0;
      }
      > a {
        padding: 10px 0;
        padding-left: 50px;
        padding-right: 20px;
        font-size: 20px;
      }
    }
    a {
      margin: 10px 0;
      padding: 0;
      > h3 {
        clear:both;
        font-size:20px;
      }
    }
  }

  .challenge-block-description {
    margin:0;
    margin-top:-10px;
    padding:0 15px 23px 30px;
  }

  span.no-link-underline {
    margin-left:-30px;
    color: #666;
  }
  div > div:last-child {
    margin-bottom:30px
  }
}

.challenge-block-time {
  font-size: 18px;
  color: #BBBBBB;
  margin-bottom: 20px;
  @media (min-width: 721px) {
    // margin-right: 20px;
    // margin-top: -30px;
    float: right;
  }
}

#noneFound {
  display:none;
  margin:60px 30px 0;
  font-size:30px;
  text-align: center;
  color:darkgreen;
  .fa {
    display:block;
    font-size:300px;
  }
}


.map-aside-body {
  .map-fixed-header {
    p {
      margin-top: 0;
      font-size: 16px;
    }
    .row.map-buttons {
      float: none;
      width: 100%;
      text-align: center;
      button {
        width: 300px;
      }
      .input-group {
        width: 300px;
        padding-top: 5px;
      }
    }
  }
  .map-buttons:first-of-type {
    float: none;
    padding-left: 0;
  }
  .map-accordion {
    top: 180px;
    h2 {
      margin: 15px 0;
      a {
        padding: 10px 0;
        padding-left: 50px;
        padding-right: 20px;
        font-size: 20px;
      }
    }
    h3 > a {
      font-size: 20px;
    }
  }
}

.night {
  .map-fixed-header {
    background-color: @night-body-bg;
  }
  .map-aside {
    border-left-color:#222;
    &-action-item {
      filter: brightness(2) saturate(0);
      -webkit-filter: brightness(2) saturate(0);
    }
  }
  #map-filter, .input-group-addon {
    border-color: #292929;
    background-color: #666;
    color:#ABABAB;
  }
  .map-accordion span.no-link-underline {
    color: @brand-primary;
  }
  .map-accordion h2 > a {
    background:#666;
  }
  .map-accordion a:focus, #noneFound {
    color: #ABABAB;
  }
  .input-group-addon {
    &.filled{
      background: @gray;
      border-color: #292929;
      color: white;
    }
  }
  .challenge-title {
    color: @night-text-color;
  }
}
